home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / ispell40.lha / ispell-4.0 / Makefile.in < prev    next >
Makefile  |  1993-06-01  |  6KB  |  222 lines

  1. # Makefile for GNU ispell.    -*- Indented-Text -*-
  2. # Copyright (C) 1992, 1993 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. CC = @CC@
  24.  
  25. INSTALL = @INSTALL@
  26. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  27. INSTALL_DATA = @INSTALL_DATA@
  28.  
  29. DEFS = @DEFS@
  30. LIBS = @LIBS@
  31.  
  32. CHARSET = @CHARSET@
  33. ALLOCA = @ALLOCA@
  34.  
  35. CFLAGS = -g
  36. LDFLAGS = -g
  37.  
  38. prefix = /usr/local
  39. exec_prefix = $(prefix)
  40.  
  41. bindir = $(exec_prefix)/bin
  42. datadir = $(prefix)/lib/ispell
  43. libdir = $(prefix)/lib/emacs/site-lisp
  44. infodir = $(prefix)/info
  45.  
  46. # Where to install the manual pages.
  47. mandir = $(prefix)/man/man1
  48. # Prefix for each installed man page, normally empty or `g'.
  49. manprefix = 
  50. # Extension (not including `.') for the installed manual page filenames.
  51. manext = 1
  52.  
  53. #### End of system configuration section. ####
  54.  
  55. SHELL = /bin/sh
  56.  
  57. LOADLIBES = $(LIBS)
  58.  
  59. DISTNAME = ispell-$(VERSION)
  60. VERSION = `sed -e '/version/!d;s/[^0-9.]*\([0-9.]*\).*/\1/;q' version.c`
  61.  
  62. # All subdirectories that go into a distribution
  63. # There are none at the moment. 
  64. ALL_SUBDIRS = 
  65.  
  66. # charset.c is automatically generated from c-generic.c or c-ibmpc.c
  67. # during configuration.
  68. SRCS = access.c c-generic.c c-ibmpc.c charset.h ctbl.c downcase.c exp.c \
  69.           expand.c freq.c getopt.c getopt1.c getopt.h hash.c hash.h lexfsm.c \
  70.           look.c mapcase.c nextprime.c suf.c version.c  util.c
  71.  
  72. OBJS = access.o charset.o ctbl.o downcase.o exp.o getopt.o getopt1.o hash.o \
  73.           lexfsm.o nextprime.o suf.o version.o util.o $(ALLOCA)
  74.  
  75. SRCS_BUILD = build.c build.h mklextbl.c
  76. OBJS_BUILD = build.o mklextbl.o
  77.  
  78. SRCS_LOOK = look.c getopt.c getopt1.c util.c
  79. OBJS_LOOK = look.o getopt.o getopt1.o util.o $(ALLOCA)
  80.  
  81. SRCS_ISPELL = case.c gen.c good.c good.h ispell.c ispell.h priv.c screen.c term.c tex.c
  82. OBJS_ISPELL = ispell.o case.o gen.o good.o priv.o screen.o term.o tex.o
  83.  
  84. SRCS_ALL = $(SRCS) $(SRCS_BUILD) $(SRCS_ISPELL)
  85. OBJS_ALL = $(OBJS) $(OBJS_BUILD) $(OBJS_ISPELL)
  86.  
  87. DICT_LIB = $(datadir)
  88.  
  89. .c.o:
  90.     $(CC) -c -I$(srcdir) $(DEFS) -DDICT_LIB=\"$(DICT_LIB)\" $(CPPFLAGS) $(CFLAGS) $<
  91.  
  92. all: build look ispell ispell.dict ispell.words ispell.info
  93.  
  94. ### targets required by GNU Coding standards ###
  95.  
  96. Makefile: Makefile.in config.status
  97.     sh ./config.status
  98.  
  99. config.status: configure
  100.     $(srcdir)/configure --srcdir=$(srcdir) --no-create
  101.  
  102. configure: configure.in
  103.     cd $(srcdir); autoconf
  104.  
  105. TAGS: $(SRCS) $(SRCS_BUILD) $(SRCS_ISPELL)
  106.     cd $(srcdir); etags $(SRCS) $(SRCS_BUILD) $(SRCS_ISPELL)
  107.  
  108. clean:
  109.     rm -f *.o *.elc ispell build freq core ispell.a freqtbl expand look
  110.  
  111. mostlyclean: clean
  112.     rm -f ispell.dict ispell.words
  113.  
  114. distclean: clean
  115.     rm -f Makefile config.status charset.c
  116.  
  117. realclean: distclean mostlyclean
  118.     rm -f TAGS ispell.info configure
  119.  
  120. install: all ispell.info installdirs
  121.     $(INSTALL_PROGRAM) ispell $(bindir)/ispell
  122.     $(INSTALL_PROGRAM) look $(bindir)/look
  123.     $(INSTALL_DATA) ispell.dict $(datadir)/ispell.dict
  124.     $(INSTALL_DATA) ispell.words $(datadir)/ispell.words
  125.     -$(INSTALL_DATA) $(srcdir)/ispell.1 $(mandir)/ispell.$(manext)
  126.     -d=$(srcdir); test -f ./ispell.info && d=.; \
  127.     cd $$d; for f in ispell.info* ; do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  128.     -$(INSTALL_DATA) $(srcdir)/ispell.el $(libdir)/ispell.el
  129.     -$(INSTALL_DATA) ispell.elc $(libdir)/ispell.elc
  130.  
  131. installdirs:
  132.     -sh $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(mandir)
  133.  
  134. uninstall: force
  135.     -cd $(bindir); rm -f ispell look
  136.     -cd $(datadir); rm -f ispell.dict ispell.words 
  137.     -cd $(infodir); rm -f ispell.info
  138.     -cd $(mandir); rm -f ispell.$(manext)
  139.     -cd $(libdir); rm -f ispell.el ispell.elc
  140.  
  141. dist: DISTFILES
  142.     rm -rf $(DISTNAME)
  143.     mkdir $(DISTNAME)
  144.     for f in `cat DISTFILES`; do \
  145.        ln $(srcdir)/$$f $(DISTNAME)/$$f || { echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
  146.     done
  147.     tar --gzip -chvf $(DISTNAME).tar.z $(DISTNAME)
  148.     rm -rf $(DISTNAME)
  149.  
  150. # Gets rid of most of the unwanted files.  Verify manually (if necessary)
  151. # that this produces a list of all the files desired in the distribution. 
  152. DISTFILES: force
  153.     (cd $(srcdir); find . $(ALL_SUBDIRS) ! -type d -print) \
  154.     | sed  '/\/RCS\//d; \
  155.            /\.tar.*/d; \
  156.            /\/#.*#/d; /~$$/d; /\.o$$/d; \
  157.            /\/config\.status$$/d; \
  158.            /\/Makefile$$/d;    \
  159.            /\/.*\.BAK$$/d; \
  160.            /\/core$$/d; \
  161.            /\/a.out$$/d; \
  162.            /\/=/d; \
  163.            /\/conftest\.c$$/d; \
  164.            /\/DISTFILES$$/d; \
  165.            /\/charset\.c/d; \
  166.            /\.toc$$/d; \
  167.            /\.aux$$/d; /\.log$$/d; \
  168.            /\.cps$$/d; /\.cp$$/d; \
  169.            /\.fns$$/d; /\.fn$$/d; \
  170.            /\.tps$$/d; /\.tp$$/d; \
  171.            /\.vrs$$/d; /\.vr$$/d; \
  172.            /\.pgs$$/d; /\.pg$$/d; \
  173.            /\.kys$$/d; /\.ky$$/d; \
  174.            s/^.\///; /^\.$$/d;' \
  175.     | sort | uniq > DISTFILES
  176.  
  177. ### ispell-specific building targets ###
  178.  
  179. $(OBJS_ALL): ispell.h
  180.  
  181. build: $(OBJS_BUILD) $(OBJS)
  182.     $(CC) $(LDFLAGS) -o build $(OBJS_BUILD) $(OBJS) $(LOADLIBES)
  183.  
  184. expand: expand.o $(OBJS)
  185.     $(CC) $(LDFLAGS) -o expand expand.o $(OBJS) $(LOADLIBES)
  186.  
  187. freq: freq.o $(OBJS)
  188.     $(CC) $(LDFLAGS) -o freq freq.o $(OBJS) $(LOADLIBES)
  189.  
  190. freqtbl: freq dict
  191.     ./freq < $(srcdir)/dict > freqtbl
  192.  
  193. look: $(OBJS_LOOK)
  194.     $(CC) $(LDFLAGS) -o look $(OBJS_LOOK) $(LOADLIBES)
  195.  
  196. ispell: $(OBJS_ISPELL) $(OBJS)
  197.     $(CC) $(LDFLAGS) -o ispell $(OBJS_ISPELL) $(OBJS) $(LOADLIBES)
  198.  
  199. ispell.info: ispell.texi
  200.     makeinfo --no-split -I$(srcdir) ispell.texi
  201.  
  202. ispell.dvi: ispell.texi
  203.     texi2dvi $(srcdir)/ispell.texi
  204.  
  205. ispell.dict: build dict freqtbl
  206.     ./build -b -f freqtbl -o ispell.dict $(srcdir)/dict
  207.  
  208. ispell.words: dict expand
  209.     ./expand $(srcdir)/dict | sort | uniq > ispell.words
  210.  
  211. charset.c: $(CHARSET)
  212.     cp $(srcdir)/$(CHARSET) charset.c
  213.  
  214. ispell.elc: ispell.el
  215.     emacs -batch -l $(srcdir)/ispell.el -f batch-make-ispell
  216.  
  217.  
  218. force:
  219.  
  220. # Prevent GNU make v3 from overflowing arg limit on SysV.
  221. .NOEXPORT:
  222.